
import drawPolygon from './drawPolygon';

// type='MultiPolygon | Polygon'

export default function (map, painter, data, cx, cy, type) {
    if (data.type == 'Polygon') {
        for (var i = 0; i < data.coordinates.length; i++) {
            drawPolygon(map, painter, data.coordinates[i], cx, cy, type);
        }
    } else {
        for (var i = 0; i < data.coordinates.length; i++) {
            for (var j = 0; j < data.coordinates[i].length; j++) {
                drawPolygon(map, painter, data.coordinates[i][j], cx, cy, type);
            }
        }
    }
};
